package catchData.startup;

import java.util.ArrayList;
import java.util.List;

import catchData.core.CountryMedIds;

/**
 * @author suwy
 * @date 2014-2-8
 * @todo TODO 多线程抓取药监局Ids
 */
public class ThreadMedIds {

	List<CountryMedIds> countryMedIdsList = new ArrayList<CountryMedIds>();
	
	private void init() {

//		countryMedIdsList.add(new CountryMedIds(1,873,"118103385532690845640177699192",30,"国产保健食品"));
//		countryMedIdsList.add(new CountryMedIds(1,48,"118103387241329685908587941736",31,"进口保健食品"));
		countryMedIdsList.add(new CountryMedIds(1,11215,"124356560303886909015737447882",25,"国产药品"));
//		countryMedIdsList.add(new CountryMedIds(1,513,"124356651564146415214424405468",36,"进口药品"));

		countryMedIdsList.add(new CountryMedIds(1,8781,"124356549685119229650057372133",63,"药品注册补充申请备案情况"));
//		countryMedIdsList.add(new CountryMedIds(1,513,"124356639813072873644420336632",32,"国产药品商品名"));
//		countryMedIdsList.add(new CountryMedIds(1,466,"118103348874362715907884020353",34,"药品生产企业"));
//		countryMedIdsList.add(new CountryMedIds(1,1448,"118715589530474392063703010776",23,"GMP认证"));
		countryMedIdsList.add(new CountryMedIds(1,9067,"118715854214917952033010551784",41,"药品经营企业"));
		countryMedIdsList.add(new CountryMedIds(1,9116,"118715593187347941914723540896",24,"GSP认证"));
//		countryMedIdsList.add(new CountryMedIds(1,67,"124356646179610926452650807501",22,"中药保护品种"));
//		countryMedIdsList.add(new CountryMedIds(1,79,"118622086116566219450310733363",1,"OTC化学药品说明书范本"));
//		countryMedIdsList.add(new CountryMedIds(1,307,"118622090243325658757488986970",2,"OTC中药说明书范本"));
//		countryMedIdsList.add(new CountryMedIds(1,1324,"124053671285715992005675373538",68,"国产化妆品"));
		countryMedIdsList.add(new CountryMedIds(1,6319,"124053679279972677481528707165",69,"进口化妆品"));
		countryMedIdsList.add(new CountryMedIds(1,4661,"118103058617027083838706701567",26,"国产医疗器械"));
//		countryMedIdsList.add(new CountryMedIds(1,21,"118715514657942222068939811234",20,"器械分类目录"));
//		countryMedIdsList.add(new CountryMedIds(1,1831,"118103063506935484150101953610",27,"进口医疗器械"));
//		countryMedIdsList.add(new CountryMedIds(1,47,"118715519595263187643733688337",21,"器械标准目录"));
		countryMedIdsList.add(new CountryMedIds(1,1896,"118714928370753714662210043652",18,"器械受检目录"));
	}
	
	private void excute() {
		for (int i = 0; i < countryMedIdsList.size(); i++) {
			CountryMedIds o = new CountryMedIds(countryMedIdsList.get(i).getStartPage(), countryMedIdsList.get(i).getEndPage(),
					countryMedIdsList.get(i).getBcId(), countryMedIdsList.get(i).getTableId(), countryMedIdsList.get(i).getFileName());
			o.start();
		}
	}
	
	public static void main(String[] args) {
		ThreadMedIds instance = new ThreadMedIds();
		instance.init();
		instance.excute();
	}

}
